<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__ADMIN__/css/pintuer.css">
<link rel="stylesheet" href="__ADMIN__/css/admin.css">
<script src="__ADMIN__/js/jquery.js"></script>
<script src="__ADMIN__/js/pintuer.js"></script>
</head>
<body>

  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 认证专家</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="{:url('admin/authen/add')}"> 添加认证专家</a> </li>
        <form method="post" action="">
        <li>搜索：</li>
          <li>
              <input type="text" placeholder="请输入职称关键字搜索" name="occuption" class="input" style="width:250px; line-height:17px;display:inline-block" />
              <button stype="submit" class="button border-main icon-search">搜索</button>
          </li>
        </form>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th>ID</th>
        <th>名称</th>
        <th>头像</th>
        <th>职称</th>
        <th>著作个数</th>
        <th>评分</th>
        <th>分享</th>
        <th>频道</th>
        <th>排序</th>
        <th>应用状态</th>
        <th>是否认证</th>
        <th width="90">创建时间</th>
        <th width="290">操作</th>
      </tr>
        {volist name="data" id="da"}
         <tr>
           <td>{$da.id}</td>
           <td>{$da.name}</td>
             <td><img src="\{$da.sm_pic}" style="width:80px;height:60px;border-radius:4px;"/></td>
           <td>{$da.occu.occu_name}</td>
           <td>{$da.work}</td>
           <td>{$da.score}</td>
           <td>{$da.share}</td>
           <td>{$da.channel}</td>
           <td>{$da.orders}</td>
           <td>{$da.status}</td>
           <td>{$da.auth}</td>
           <td>{$da.create_time}</td>
          <td><div class="button-group">
            <!--<a class="button border-main" href="{:url('admin/casedetails/info')}"><span class="icon-edit"></span> 详情</a>-->
            <a class="button border-main" href="{:url('admin/authen/edit',['id'=>$da.id])}"><span class="icon-edit"></span> 修改</a>
            <a class="button border-red" href="javascript:void(0)" onclick="return del({$da.id})"><span class="icon-trash-o"></span> 删除</a>
          </div></td>
        </tr>
        {/volist}
      <tr>
        <td colspan="9">
            {$data->render()}
        </td>
      </tr>
    </table>
  </div>

<script type="text/javascript">
//单个删除
function del(id){
	if(confirm("您确定要删除吗?")){
        $.ajax({
            type : "GET",
            url : "{:url('admin/authen/del')}",
            data : "id="+id,
            dataType :'json',
            success:function (data) {
//                console.log(data);
                  alert(data);
                  location.reload(true);
            },
            error:function (data) {
            },
        })
	}else{
	    return false;
    }
}
</script>
</body>
</html>